//
//  LFAFHTTPClient.h
//  QingDaoCommunity
//
//  Created by 李学林 on 15/11/23.
//  Copyright © 2015年 teteTechnology. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

typedef void(^RequestSuccess)(id obj);
typedef void(^RequestFailed)(NSError *error);

/**
 *  抽象出一个网络请求类
 */
@interface LFAFHTTPClient : AFHTTPSessionManager

+(instancetype)sharedManager;


/**
 *  给外界提供一个请求网络的接口并返回一些网络请求的数据
 */

+ (void)getURL:(NSString *)url WithParas:(NSDictionary *)paras WithRequestSuccess:(RequestSuccess)success WithFailled:(RequestFailed)failed;

+ (void)postURL:(NSString *)url WithParas:(NSDictionary *)paras WithRequestSuccess:(RequestSuccess)success WithFailled:(RequestFailed)failed;

/**
 *  这个方法主要是想实现在这个类中实现数据的解析,把解析好的数据传递给调用这个方法的控制器
 *
 */
+ (void)getHomeWithParas:(NSDictionary *)paras WithRequestSuccess:(RequestSuccess)success WithFailled:(RequestFailed)failed;

@end
